package com.alibaba.service.Impl;

import com.alibaba.mapper.DeptMapper;
import com.alibaba.pojo.Dept;
import com.alibaba.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;
    @Override
    public List<Dept> list() {
        List<Dept> dept = deptMapper.list();
        return dept;
    }

    @Override
    public void add(Dept dept) {
        deptMapper.add(dept);
    }

    @Override
    public void deleteById(Integer id) {
        deptMapper.deleteById(id);
    }

    @Override
    public Dept query(Integer id){
        return deptMapper.query(id);
    }

    @Override
    public void update(Dept dept) {
        deptMapper.update(dept);
    }
}
